#ifndef VIDEOTEST_H
#define VIDEOTEST_H

#include "test_common.h"
#include <easyvid.h>


class SceneCinema : public SceneObject
{
public:
    SceneCinema(SceneGraph* scene);
    virtual ~SceneCinema();

    virtual void onUpdate(float dt);
    virtual void onRender();

    void playVideo(const char* filename);

private:
    GLTexture*      texFrame;
    VidSource*      video;
};


class VideoTest : public GLClient
{
public:
    VideoTest(GLEngine* engine);
    virtual ~VideoTest();

    virtual void onEnter();
	virtual void onLeave();
	virtual void onEvent(GLEvent e);
	virtual void onUpdate(float dt);
	virtual void onDraw();

private:
    GLCamera        camera;
    SceneGraph*     scene;
    SceneCinema*    cinema;
};

#endif // VIDEOTEST_H
